A storage system of smart card is mainly made up of Random-Access Memory (RAM), Read-Only Memory (RAM) and Electrically Erasable Programmable Read-Only Memory (EEPROM). Java Card is a smart card which can execute Java program code. Applications stored in EEPROM of the Java card can perform operations such as downloading, installing and deleting by GlobalPlatform standard instruction (GP instruction). Masked application is an application stored in ROM, which cannot be deleted; non-masked application is an application stored in flash and e2p.
In the prior art, in the case that function defection or error is found in an original application during use of a Java Card, problems like that can be solved by deleting the original application, downloading and installing a new application, which may lead to data loss of users in using process. If size of the application on Java Card is big and the size of modified content is small, the whole application program requires to be re-downloaded, installed and personalized after being modified, which wastes time. For a masked Java Card, codes cannot be deleted after the codes being written in ROM. If defection exists, the whole application cannot be used. Similarly, in process of developing Chip Operating System (COS), either card management module, Java Card Runtime Environment (JCRE) module or Java Card Virtual Machine (JCVM) module, which is implemented using Java language, may have defection. Once masking is completed, program cannot be modified.